<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>商品管理</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../../../component/elementUI/index.css">
    <link rel="stylesheet" href="../../../style/wangeditor.css">
    <link rel="stylesheet" href="../../../style/index.css">
    <style>
        .el-badge__content{
            z-index: 1;
        }
        #user .el-dialog{
            margin-top:10px!important;
            margin: 0 auto 10px;
        }

        #user .el-dialog__header {
            padding: 15px 15px 0;
        }

        #user .el-dialog__body {
            padding: 0 15px 0;
        }
        
        #user .el-input.is-disabled .el-input__inner {
            color: #000;
            background-color: #fff;
        }
    </style>
</head>

<body>
    <div id="app" v-cloak class="minWidth">
        <el-form :inline="true" :form="form">
            <el-form-item>
                <el-button type="danger" @click="window.history.back()">返回</el-button>
            </el-form-item>
            <el-form-item>
                <el-input v-model.trim="form.Article_Name" clearable placeholder="请输入商品名称"/>
            </el-form-item>
            <el-form-item>
                <el-select clearable v-model.trim="form.Brand_SerialNumber" placeholder="请选择商品品牌" filterable style="width: 100%">
                    <el-option v-for="(item,index) in brand" :key="index" :label="item.Brand_Name" :value="item.Brand_SerialNumber"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="onSerach">查询</el-button>
            </el-form-item>
            <el-form-item>
                <el-dropdown trigger="click" @command="batchConfig">
                    <el-button type="primary">
                        批量操作<i class="el-icon-arrow-down el-icon--right"></i>
                    </el-button>
                    <el-dropdown-menu slot="dropdown">
                        <el-dropdown-item command="true">批量同意</el-dropdown-item>
                        <el-dropdown-item command="false">批量拒绝</el-dropdown-item>
                    </el-dropdown-menu>
                </el-dropdown>
            </el-form-item>
        </el-form>
        <el-table :data="tableData" stripe border height="calc(100vh - 140px)" style="width: 100%" @selection-change="handleSelectionChange">
            <el-table-column type="selection" align="center" width="50"></el-table-column>
            <el-table-column align="center" type="index" label="序号" width="50"></el-table-column>
            <el-table-column prop="Article_SerialNumber" label="商品内码"></el-table-column>
            <!-- <el-table-column prop="Article_Code" label="商品编号"></el-table-column> -->
            <el-table-column prop="Picture_URL" width="140" align="center" label="商品封面">
                <template v-slot="{row}">
                    <el-image fit="contain" :preview-src-list="[BASE_IMG + row.Picture_URL]" :src="BASE_IMG + row.Picture_URL" style="width:100px;height: 100px;"></el-image>
                </template>
            </el-table-column>
            <el-table-column prop="Article_Name" label="商品名称"></el-table-column>
            <el-table-column prop="Brand_Name" label="品牌"></el-table-column>
            <!-- <el-table-column prop="Category_Name" label="类别"></el-table-column>
            <el-table-column prop="Series_Name" label="系列"></el-table-column>
            <el-table-column prop="Unit_Price" label="吊牌价"></el-table-column> -->
            <el-table-column prop="JDCOM_URL" label="京东链接"></el-table-column>
            <el-table-column prop="JDCOM_Unit_Price" label="京东价"></el-table-column>
            <el-table-column  align="center" label="操作" width="180">
                <template v-slot="{row}">
                    <el-button type="success" size="small" @click="Show(row)">详情</el-button>
                    <el-dropdown size="small" trigger="click"  @command="examine($event,row)">
                        <el-button size="small" type="primary">
                            更多<i class="el-icon-arrow-down el-icon--right"></i>
                        </el-button>
                        <el-dropdown-menu slot="dropdown">
                            <el-dropdown-item command="true">通过</el-dropdown-item>
                            <el-dropdown-item command="false">拒绝</el-dropdown-item>
                        </el-dropdown-menu>
                    </el-dropdown>
                </template>
            </el-table-column>
        </el-table>
        <el-pagination style="margin-top: 5px;" background @size-change="handleSizeChange"
            @current-change="handleCurrentChange" :current-page="form.page" :page-sizes="[10, 20, 30, 50]"
            :page-size="form.limit" layout="total, sizes, prev, pager, next, jumper" :total="total">
        </el-pagination>
        <show-detail :visible.sync="dialogVisible" :data="Article_SerialNumber"></show-detail>
    </div>
    <script type="text/javascript" src="../../../utils/wangeditor.js"></script>
    <script type="text/javascript" src="../../../utils/jquery.min.js"></script>
    <script type="text/javascript" src="../../../utils/jquery.cookie.js"></script>
    <script type="text/javascript" src="../../../utils/vue.min.js"></script>
    <script type="text/javascript" src="../../../utils/vuex.min.js"></script>
    <script type="text/javascript" src="../../../component/elementUI/index.js"></script>
    <script type="text/javascript" src="../../../component/component.js"></script>
    <script type="text/javascript" src="../../../config/config.js"></script>
    <script type="text/javascript" src="../../../utils/FileSaver.min.js"></script>
    <script type="text/javascript" src="../../../utils/FileSaver.js"></script>
    <script type="text/javascript" src="../../../utils/xlsx.full.min.js"></script>
    <script type="text/javascript" src="../../../utils/xlsx.core.min.js"></script>
    <script type="text/javascript" src="../../../utils/compressor.js"></script>
    <script type="text/javascript" src="../../../utils/ID_Validity.js"></script>
    <script type="text/javascript" src="../../../utils/utils.js"></script>
    <script type="text/javascript" src="js/examine.js"></script>
</body>

</html>